﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using GalaSoft.MvvmLight;

namespace ExcelMergeDocs.WinClient.ViewModel {
    public class SelectableViewModel : ViewModelBase {
        #region IsSelected
        private bool _isSelected;
        public const string IsSelectedPropertyName = "IsSelected";

        public bool IsSelected {
            get { return _isSelected; }
            set {
                if (_isSelected != value) {
                    RaisePropertyChanged(IsSelectedPropertyName, _isSelected, value, true);
                    _isSelected = value;
                }
            }
        }
        #endregion end

        #region Name
        private string _name;
        private const string WorksheetNamePropertyName = "Name";

        public string Name {
            get { return _name; }
            set {
                if (_name != value) {
                    RaisePropertyChanged(WorksheetNamePropertyName, _name, value, true);
                    _name = value;
                }
            }
        }
        #endregion end

        #region IsExpanded
        private bool _isExpanded;
        private const string IsExpandedPropertyName = "IsExpanded";

        public bool IsExpanded {
            get { return _isExpanded; }
            set {
                if (_isExpanded != value) {
                    RaisePropertyChanged(IsExpandedPropertyName, _isExpanded, value, true);
                    _isExpanded = value;
                }
            }
        }
        #endregion end
    }
}
